﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;

namespace QQSDK
{
    [Serializable]
    public class ProductDetail
    {
        public string productIdentifier;//商品的id

        public string localizedDescription;//商品的本地化描述

        public string localizedTitle;//商品的标题

        public string price;//商品的价格

        public ProductType productType;

        public override string ToString()
        {
            return string.Format("[PurchaseBean: productIdentifier={0}, localizedDescription={1}, localizedTitle={2}, price={3}, purchasetype={4}]", productIdentifier, localizedDescription, localizedTitle, price, productType);
        }
        //查询时需要的构造函数
        public ProductDetail(string productIdentifier, ProductType purchasetype)
        {
            this.productIdentifier = productIdentifier;
            this.productType = purchasetype;
        }
        //详细信息的构造函数
        public ProductDetail(string productIdentifier, string localizedDescription, string localizedTitle, string price, ProductType productType)
        {
            this.productIdentifier = productIdentifier;
            this.localizedDescription = localizedDescription;
            this.localizedTitle = localizedTitle;
            this.price = price;
            this.productType = productType;
        }
    }
    public enum ProductType
    {
        Consume,
        NonConsume,
        Subs
    }
    public enum PurchaseFailedReason
    {
        Consume,
        NonConsume,
        Subs
    }
}
